<template>
    <section>
        <el-dialog :lock-scroll='true' size='large' :title="getTitle()" v-model="o.showTaskDialog" :close-on-click-modal="false"
            @open="wOpen()">
            <div class='div_taskInfo' v-loading.body="loading">
                <div>

                    <el-form class="demo-form-inline" v-if="customerOrder[currObj.flowClassId]" >
                        <el-row>


                            <el-col :span="12">
                                <el-form-item label="订单编号">
                                    <span v-text="customerOrder.code"></span>

                                    <el-popover ref="popover5" placement="right" width="500px">

                                        <customerOrderShow :customerOrderId="currObj.customerOrderId" :dataType="currObj.flowClassId"></customerOrderShow>

                                    </el-popover>

                                    <el-button size="small" v-popover:popover5><i class="fa fa-eye"></i></el-button>

                                </el-form-item>
                                <el-form-item label="订单名称">
                                    <span v-text="customerOrder.name"></span>
                                </el-form-item>
                                <el-form-item label="服装分类">
                                    <span v-text="getClothesClassName(customerOrder.classId)"></span>
                                </el-form-item>

                            </el-col>


                            <el-col :span="12">
                                <el-form-item label="任务名称">
                                    <span v-text="currObj.name"></span>
                                </el-form-item>
                                <el-form-item label="任务类别">
                                    <span v-text="getTaskClassName(currObj.taskClassId)"></span>
                                </el-form-item>
                                <el-form-item label="任务进度">
                                    <span v-text="getTaskStatusName(currObj.statusId)"></span>
                                </el-form-item>
                                <el-form-item v-if="currObj.flowClassId=='proof'" label="样衣备注">
                                    <span v-text="customerOrder[currObj.flowClassId].memo"></span>
                                </el-form-item>
                                <el-form-item v-if="currObj.flowClassId=='bulk'" label="大货备注">
                                    <span v-text="customerOrder[currObj.flowClassId].memo"></span>
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </el-form>


                </div>
                <div v-if="!loading">

                    <div v-if="currObj.taskClassId=='root'">

                        <tRoot :currObj="currObj"></tRoot>
                    </div>
                    <div v-if="currObj.taskClassId=='default'">

                        <tDefault :currObj="currObj"></tDefault>
                    </div>

                    <div v-if="currObj.taskClassId=='100'">

                        <t100 :currObj="currObj"></t100>
                    </div>
                    <div v-if="currObj.taskClassId=='200'   ">

                        <t200 :currObj="currObj"></t200>
                    </div>

                    <div v-if="currObj.taskClassId=='300'">

                        <t300 :currObj="currObj" :customerOrder="customerOrder"></t300>
                    </div>
                    <div v-if="currObj.taskClassId=='400' ">

                        <t400 :currObj="currObj"></t400>
                    </div>
                    <div v-if="currObj.taskClassId=='500'">
                        <t500 :currObj="currObj" v-if="currObj.detail.length>0"></t500>
                    </div>
                    <div v-if="currObj.taskClassId=='600'">

                        <t600 :currObj="currObj"></t600>
                    </div>
                    <div v-if="currObj.taskClassId=='700'">

                        <t700 :currObj="currObj"></t700>
                    </div>
                    <div v-if="currObj.taskClassId=='800'">

                        <t800 :currObj="currObj"></t800>
                    </div>
                    <div v-if="currObj.taskClassId=='900'">

                        <t900 :currObj="currObj"></t900>
                    </div>
                    <el-row v-if="currObj.taskClassId=='800' || currObj.taskClassId=='700' || currObj.taskClassId=='600' || currObj.taskClassId=='500'   ">
                        <div class="div_ft2">
                            <el-button type="text" @click.native="allDone">全部完成</el-button>
                        </div>
                    </el-row>
                    <el-row>
                        <div class="div_ft">
                            <el-button @click.native="closeTaskDialog()">取消</el-button>
                            <el-button type="primary" @click.native="saveMyTask">提交</el-button>
                        </div>
                    </el-row>
                </div>
            </div>
        </el-dialog>

    </section>

</template>

<script src='./myTaskInfo.js'></script>
<style scoped lang="scss">
    ul {

        margin: 0;
        padding: 0;
    }

    li {
        margin: 0;
        padding: 0;
        list-style: none
    }

    .div_ft {
        text-align: right
    }

    .div_ft2 {
        text-align: right;
        line-height: 30px;
    }

    .el-form-item {
        margin: 0
    }
</style>